<template>
<div class="setup">
  <nav-bar title="接单设置" fixed="fixed" />
  <div class="order-centent">
    <div class="title">收款码设置</div>
    <div class="info">选择开启接单使用的收款码</div>
    <div class="typeList">
      <van-checkbox-group v-model="checkboxResult">
        <template v-for="(item,index) in cardType">
          <div class="list" :key="index" @click="typeToggle(index)">
            <span>{{item.name}}</span>
            <van-checkbox :name="item.id" :ref="'checkbox_'+index" />
          </div>
        </template>
      </van-checkbox-group>
    </div>
    <van-checkbox-group v-model="checkboxResult">
      <div class="checkbox-list" @click="checkboxToggle(index)">
        <div class="title">微信</div>
        <div class="info">
          <span class="name">我是一只小小鸟</span>
          <span class="tel">18928431859</span>
          <span class="note">备注：我这是一个备注</span>
        </div>
        <van-checkbox name="wx" ref="checkbox1"/>
      </div>
      <div class="checkbox-list">
        <div class="title">支付宝</div>
        <div class="info">
          <span class="name">我是一只小小鸟</span>
          <span class="tel">18928431859</span>
          <span class="note">备注：我这是一个备注</span>
        </div>
        <van-checkbox name="zfb" ref="checkbox2"/>
      </div>
      <div class="checkbox-list">
        <div class="title">支付宝</div>
        <div class="info">
          <span class="name">我是一只小小鸟</span>
          <span class="tel">18928431859</span>
          <span class="note">备注：我这是一个备注</span>
        </div>
        <van-checkbox name="zfb" ref="checkbox2"/>
      </div>
    </van-checkbox-group>
  </div>
  <div class="submit">
    <j-botton type="blue" :disabled="disabled" :loading="isLoading" loadingText='提交中' @click.native="Login">立即支付</j-botton>
  </div>
</div>
</template>
<script>
export default {
  name: 'setup',
  data() {
    return {
      checkboxResult: [],
      disabled: false,
      isLoading: false,
      isVoiceChecked: false,
      isTouchIdChecked: false,
      cardType: [{
        id: 1,
        name: '银行卡'
      }, {
        id: 2,
        name: '支付宝'
      }, {
        id: 3,
        name: '微信'
      }]
    };
  },
  created() {
  },
  mounted() {
  },
  methods: {
    typeToggle(index) {
      this.$refs['checkbox_' + index][0].toggle();
    }
  }
};
</script>
<style lang="less" scoped>
.setup{
  .submit{
    background-color: #f4f4f4;
    padding: 0 30px 30px;
  }
  .order-centent{
    padding: 32px;
    .typeList{
      .van-checkbox-group{
        display: flex;
        margin-left: -15px;
      }
      .list{
        flex: 1;
        display: flex;
        background-color: #fff;
        padding: 26px 30px;
        font-size: 28px;
        margin-left: 15px;
        border-radius: 10px;
        justify-content: space-between;
      }
    }
    .title{
      font-size: 30px;
    }
    .info{
      font-size: 20px;
      color: #999;
      padding: 20px 0;
    }
    .checkbox-list{
      background-color: #fff;
      padding: 33px;
      border-radius: 4px;
      margin-top: 30px;
      position: relative;
      .title{
        font-size: 30px;
        color: #0C82F4;
      }
      .info{
        padding-left: 30px;
        .name{
          display: block;
          color: #999;
          font-size: 22px;
        }
        .tel{
          display: block;
          font-size: 32px;
          color: #212121;
          padding: 15px 0;
        }
        .note{
          color: #333;
        }
      }
      .van-checkbox{
        position: absolute;
        top:50%;
        margin-top:-25px;
        right: 50px;
      }
    }
  }
}
</style>
